package com.usian.service.impl;

import com.usian.mapper.EtcMapper;
import com.usian.pojo.Etc;
import com.usian.service.EtcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EtcServiceImpl implements EtcService {
    @Autowired
    private EtcMapper etcMapper;

    @Override
    public List<Etc> findAll() {
        return etcMapper.findAll();
    }

    @Override
    public void add(Etc etc) {
        etcMapper.insert(etc);
    }

    @Override
    public Etc findById(Integer id) {
        return etcMapper.selectById(id);
    }

    @Override
    public void update(Etc etc) {
        etcMapper.update(etc);
    }

    @Override
    public void delete(Integer id) {
        etcMapper.deleteById(id);
    }

    @Override
    public List<Etc> select() {
        return etcMapper.findAll();
    }

    @Override
    public List<Etc> findName(Etc etc) {
        return etcMapper.findName(etc);
    }

    @Override
    public List<Etc> findName2(Etc etc) {
        return etcMapper.findName(etc);
    }
}
